#ifndef __AUDIOFILE_INCLUDED
#define __AUDIOFILE_INCLUDED

namespace Audio
{
	class IFile;

	namespace IO
	{
		class AudioFile : IFile
		{
		public:
			AudioFile(const STRING& path);
			~AudioFile();			
			
			virtual void    Open();
			virtual void	Close();
			virtual UINT32	DataPosition() = 0;
			virtual UINT32	DataSize() = 0;

			virtual void*	GetInfo() = 0;
			virtual UINT32	GetInfoSize() = 0;

			virtual void	LoadInfo() = 0;

			UINT32			Read(UINT8* buffer, UINT32 size);
			void			Seek(UINT32 pos);
			UINT32			Tell();
			BOOL			Eof();

		protected:
			virtual void	Open(const FileOpenParameters& p);
			
			STRING					fileName;			
			std::streampos			dataPosition;			
			
			IFile*				    fileReader;
		};	
	}
}


#endif